package net.entelijan.cobean.util;

public class Interval {

	private int from;

	private int to;

	public Interval() {
		super();
	}

	public Interval(int from, int to) {
		super();
		this.from = from;
		this.to = to;
	}

	@Override
	public String toString() {
		return "Interval (" + from + "," + to + ")";
	}

	public int getFrom() {
		return from;
	}

	public int getTo() {
		return to;
	}

	@Override
	public boolean equals(Object obj) {
		boolean re = false;
		if (obj instanceof Interval) {
			Interval otherInt = (Interval) obj;
			re = otherInt.from == from && otherInt.to == to;
		}
		return re;
	}

	@Override
	public int hashCode() {
		return 1;
	}
}
